package com.sen.patterns.structural.composite.ex1;

import junit.framework.TestCase;

public class Test extends TestCase {
	public void testComposite() {
		
		Cabinet cabinet = new Cabinet("Cabinet 部件");
		Chassis chassis = new Chassis("Chassis 部件");
		
		cabinet.add(chassis);
		chassis.add(new Disk("100G硬盘 部件"));
		
		System.out.println("netPrice : " + cabinet.netPrice());
		System.out.println("discountPrice : " + cabinet.discountPrice());
	}
}
